package com.cooksys.film_rental.dao;

import com.cooksys.film_rental.model.Customer;
import com.cooksys.film_rental.model.User;

/**
 * Data access object for the {@link User} class
 * 
 * @author Peter Zastoupil
 * 
 */
public interface UserDao {

	/**
	 * 
	 * @param userId
	 *            the String representation of the userId to search by
	 * @return the {@link User} object associated with the given userId
	 */
	public User getUserByUserId(String userId);

	/**
	 * 
	 * @param customerId
	 *            the customerId to search by
	 * @return the {@link User} object associated with the given customerId
	 */
	public User getUserByCustomerId(Short customerId);

	/**
	 * 
	 * @param customer
	 *            the {@link Customer} to search by
	 * @return the {@link User} object associated with the given customer
	 */
	public User getUserByCustomer(Customer customer);

	/**
	 * 
	 * @param user
	 *            the {@link User} to save in the database
	 * @return the {@link User} that was saved
	 */
	public User save(User user);

}